<?php
$PAGE='LeNouveauMonde - Classement';
$VERSION='1.0';
$REQUETES=0;
$chronoDebut = microtime(true);

require("includes/configDB.inc.php");
require("includes/fonctions.php");
include("menu.php");

$corps .="<h1>Classement des Royaumes du Nouveau Monde</h1>";

$query="SELECT r.nmr_nom, r.nmr_seigneur, r.nmr_titre, r.nmr_sexe, r.nmr_ha, r.nmr_race, r.nmr_id, r.nmr_habitants, nmr_protection
FROM nm_royaume r ORDER by r.nmr_ha DESC";

$result=lnmQuery($query);
$i="1";
$corps .= '<table class="normal">
		<tr>
		<th>Rank</th>
		<th>Royaume</th>
		<th>Seigneur</th>
		<th>Race</th>
		<th>Taille (ha)</th>
		</tr>';

while($row = mysql_fetch_object($result)){
  $nom=stripslashes($row->nmr_nom);
  $ha=$row->nmr_ha;
  $race=$row->nmr_race;
  $guilde=$row->nmr_guilde;
  $id=$row->nmr_id;

  $seigneur=stripslashes($row->nmr_seigneur);
  $ha2 = explode(".",$ha);

  $corps .= '<tr><td>'.$i.'</td><td>'.$nom.'</td><td>'.$seigneur.'</td><td>'.$race.'</td>';
  $corps .= '<td class="tD">'.format($ha2[0],0).'</td></tr>';
  $i++;
}
$corps .="</table>";


affiche_page($PAGE,$menu,$corps);
?>
